package com.aftersale.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 
 * @TableName solve
 */
@TableName(value ="solve")
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.aftersale.demo.entity.Solve",description = "解决方案")
public class Solve implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 解决人id
     */
    private Integer userId;

    /**
     * 问题id
     */
    private Integer problemId;

    /**
     * 问题名
     */

    @TableField(exist = false)
    private String name;

    /**
     * 解决方法
     */
    @NotBlank(message = "解决方法不能为空")
    @Size(min = 1,max = 1000,message = "解决方法过长，请以文档的方式上传")
    private String solveDesc;

    /**
     * 解决文件下载地址
     */
    private String url;

    @TableField(exist = false)
    private MultipartFile file;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}